@import url('https://fonts.googleapis.com/css?family=Quicksand');

@media screen and (max-width: 799px) {
  .main-result {
    flex-direction: column-reverse !important;
  }

  #response {
    margin-top: 10px !important;
  }

  #result-separator {
    visibility: visible !important;
  }
}

* {
  margin: 0;
  margin: 0;
}

html {
  font-family: 'Quicksand', sans-serif;

  background-color: #FBFBFB;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 400px;
}

.header {
  display: flex;
  align-items: center;

  background-color: #eeeeee;
  box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.1);
}

.header .header-logo {
  width: 70px;
  height: 70px;

  margin: 5px;
  margin-left: 35px;
  margin-right: 10px;
}

.header .header-title {
  font-size: 35px;
  text-transform: uppercase;
}

.separator {
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 20px;
  margin-right: 20px;

  border-bottom: 1px dashed #CECECE;
}

#result-separator {
  display: none;
  visibility: hidden;

  margin-left: 0;
  margin-right: 0;
}

.menu {
  margin: 20px;
}

.image-form {
  display: flex;

  width: 650px;
  margin-top: 10px;
  margin-left: 20px;
}

.form-options {
  display: flex;
  flex-direction: column;
  width: 520px;
}

.form-options .form-option {
  display: flex;
  margin: 5px;
}

.form-options .form-option .form-option-label {
  display: flex;
  flex-grow: 1;
}

.form-options .form-option .form-option-value {
  display: flex;
  align-items: baseline;
}

#image-field {
  text-align: right;
  width: 300px;
}

#prob-threshold {
  height: 20px;
  width: 250px;
}

#prob-threshold-value {
  box-sizing: border-box;
  margin-left: 10px;
  width: 40px;
  text-align: right;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.form-actions .form-button {
  width: 100px;
  height: 35px;

  margin-left: 50px;

  background-color: #0098D6;
  box-shadow: 0px 0px 1px #58585B;
  border: 1px solid #0098D6;
  border-radius: 3px;

  font-size: 18px;
  color: white;
  cursor: pointer;
}

.main-result {
  display: flex;
  flex-direction: row;
  flex: 1;
  margin: 20px;
}

.main-result-canvas {
  display: flex;
  justify-content: center;
  flex-grow: 1;
}

#result-canvas {
  width: 100%;
  max-height: 0;
  margin: 0 0 20px 0;
}

#response {
  display: none;
  margin-left: 20px;
  margin-right: 20px;
}

#response > div {
  margin-bottom: 20px;
}

#response > pre {
  max-height: 500px;
  box-sizing: border-box;

  width: 310px;
  padding: 10px;

  border-radius: 5px;
  border: 1px dashed #cecece;
  background-color: #d3e2e9;
  color: 333333;

  font-size: 12px;
  overflow-y: auto;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 50px;

  background-color: #eeeeee;
  box-shadow: 0 -2px 1px rgba(0, 0, 0, 0.1);
}

.footer-logo {
  height: 30px;
}

#loading {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  overflow: hidden;
}

/* Spinner from https://projects.lukehaas.me/css-loaders/ */
.loader {
  font-size: 10px;
  margin: 50px auto;
  text-indent: -9999em;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0099d6;
  background: -moz-linear-gradient(
    left,
    #0099d6 10%,
    rgba(0, 153, 214, 0) 42%
  );
  background: -webkit-linear-gradient(
    left,
    #0099d6 10%,
    rgba(0, 153, 214, 0) 42%
  );
  background: -o-linear-gradient(left, #0099d6 10%, rgba(0, 153, 214, 0) 42%);
  background: -ms-linear-gradient(
    left,
    #0099d6 10%,
    rgba(0, 153, 214, 0) 42%
  );
  background: linear-gradient(
    to right,
    #0099d6 10%,
    rgba(0, 153, 214, 0) 42%
  );
  position: relative;
  -webkit-animation: load3 1.4s infinite linear;
  animation: load3 1.4s infinite linear;
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}

.loader:before {
  width: 50%;
  height: 50%;
  background: #0099d6;
  border-radius: 100% 0 0 0;
  position: absolute;
  top: 0;
  left: 0;
  content: '';
}

.loader:after {
  background: #FBFBFB;
  width: 75%;
  height: 75%;
  border-radius: 50%;
  content: '';
  margin: auto;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

@-webkit-keyframes load3 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes load3 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
